package top.wilsonlv.jaguar.cloud.upms.controller.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import top.wilsonlv.jaguar.cloud.upms.sdk.enums.ClientType;
import top.wilsonlv.jaguar.cloud.upms.sdk.enums.MenuType;
import top.wilsonlv.jaguar.commons.web.base.BaseModifyDTO;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Set;

/**
 * @author lvws
 * @since 2021/8/16
 */
@Data
@ApiModel
@EqualsAndHashCode(callSuper = true)
public class MenuModifyDTO extends BaseModifyDTO {

    @NotNull(message = "资源服务ID为非空")
    @ApiModelProperty(value = "资源服务ID", required = true)
    private Long resourceServerId;

    @NotNull(message = "父ID为非空")
    @ApiModelProperty(value = "父ID", required = true)
    private Long parentId;

    @NotBlank(message = "名称为非空")
    @ApiModelProperty(value = "名称（唯一）", required = true)
    private String menuName;

    @ApiModelProperty(value = "权限（唯一）")
    private String menuPermission;

    @ApiModelProperty("排序")
    private Integer menuOrder;

    @NotNull(message = "类型为非空")
    @ApiModelProperty(value = "类型", required = true)
    private MenuType menuType;

    @ApiModelProperty("图标")
    private String menuIcon;

    @ApiModelProperty("展示页面")
    private String menuPage;

    @ApiModelProperty("keepAlive")
    private Boolean keepAlive;

    @NotEmpty(message = "客户端类型为非空")
    @ApiModelProperty("客户端类型")
    private Set<ClientType> clientTypes;

}
